home *** CD-ROM | disk | FTP | other *** search
- ;*******************************************************************
- ;
- ; drvrhead.asm
- ; ------------
- ;
- ; (c) 1987, 1988 Attic Software
- ;
- ; header for DRVR segment of Transfer.
- ;
- ;*******************************************************************
-
- ;*******************************************************************
- ; includes
- ;*******************************************************************
-
- include sysequ.d
- include types.asm
-
- ;*******************************************************************
- ; inported routines
- ;*******************************************************************
-
- xref open
- xref ctl
-
- ;*******************************************************************
- ; exported routines
- ;*******************************************************************
-
- xdef initglobals
- xdef setdir
-
- ;*******************************************************************
- ;
- ; The canonical DA header. This is a modified version of
- ; the DA header supplied with TML Pascal.
- ;
- ;*******************************************************************
-
- dc.w $0400 ; flags
- dc.w $0000 ; service rate
- dc.w $ffff ; event mask
- dc.w $0000 ; menuID goes here
- dc.w ornopen ; open routine
- dc.w orndone ; prime
- dc.w ornctl ; Control
- dc.w orndone ; Status
- dc.w ornclose ; close
-
- ;*******************************************************************
-
- dc.w '(c) 1987, 1988 Attic Software'
- dc.w 'All rights reserved'
-
- ;*******************************************************************
-
- ornopen
- movem.l A0/A1,-(SP)
- move.l A1,-(SP) ; stack device
- move.l A0,-(SP) ; stack param
- jsr open
- movem.l (SP)+,A0/A1
- move.l jiodone,-(SP)
- rts
-
- ornctl
- movem.l A0/A1,-(SP)
- move.l A1,-(SP) ; stack device
- move.l A0,-(SP) ; stack param
- jsr ctl
- movem.l (SP)+,A0/A1
- move.l jiodone,-(SP)
- rts
-
- ornclose
- orndone
- move.l jiodone,-(SP)
- rts
-
- ;*******************************************************************
- ;
- ; The routine loader moves a selector into D0, and the
- ; address of the PACK segment into A0. It then jumps to
- ; the pack (the pack begins with a jump table).
- ;
- ;*******************************************************************
-
- initglobals
- move.w #0,D0
- bra.w loader
-
- setdir
- move.w #4,D0
- bra.w loader
-
- loader
- movea.l 4(SP),A0 ; globals
- movea.l WRpackaddr(A0),A0
- jmp (A0)
-
- ;*******************************************************************
-